<?php 
// Lay cac thong so cau hinh chung
include "../../app_global.php";
// Lay cac hang so dung chung
include "../../const.php";
// Ham thuc hien lay ten file va hien thi noi dung
include "../../isa-lib/isa-function/isa_public_function.php";
require_once("../../isa-lib/nusoap/nusoap.php");
include "../../isa-lib/isa-function/prax.php";
// Kiem tra NSD da login hay qua timeout chua
//include "../../test_login.php";
include "../../connect.php";
include "../../connect_ado.php";
// Khoi tao cac bien SESSION chua quyen modul, function cua NSD
include "../../init_session.php";
// Lay cac thong so cau hinh rieng cho chuc nang nay
include "../../onegate_function.php";
include "../receive/const.php";
include "../handle/const.php";
include "../archives/const.php";
include "app_local.php";
include "const.php";
if (!isset($_REQUEST['modal_dialog_mode'])) {
	include "../../dsp_viewing_mode_header.php";
}else{
	include "../../dsp_modal_dialog_header.php";
}
?>
<script src="../../isa-lib/isa-js/isa_util.js" ></script>
<script src="../receive/js_record.js"></script>
<script src="../handle/js_handle.js"></script>
<script src="../archives/js_archives.js"></script><?php
switch($fuseaction) {
	case "DISPLAY_ALL_PROCESSED_RECORD";
		$v_detail_status_compare = " And ((C_CURRENT_STATUS = ''CAP_PHEP'' And C_DETAIL_STATUS = 51) Or (C_CURRENT_STATUS = ''TU_CHOI'')) ";
		$v_fuseaction_onclick = "DISPLAY_SINGLE_RECORD_INFOMATION";
		$v_is_view_record_on_net = 1;
		$v_xml_file_name = "danh_sach_ho_so_cong_dan_tra_cuu.xml";
		include "../record-lib/qry_all_recordtype_by_staff.php";
		include "../record-lib/qry_all_record.php";
		include "../record-lib/dsp_all_record.php";
		break;
	case "DISPLAY_ALL_PROCESSING_RECORD";
		$v_detail_status_compare = " ";
		$v_status_list = "DANG_THU_LY";
		$v_fuseaction_onclick = "DISPLAY_ALL_RECORD_WORK";
		$v_title = CONST_VIEW_PROCESSING_RECORD_TITLE;
		$v_worktype = "";
		$v_show_date = false;
		$v_receive_date = "";
		$v_is_view_record_on_net = 1;
		include "../record-lib/qry_all_recordtype_by_staff.php";
		include "../record-lib/qry_all_record.php";
		include "../record-lib/dsp_all_record.php";
		break;
	case "DISPLAY_ALL_NO_PROCESSING_RECORD";
		$v_detail_status_compare = " And C_DETAIL_STATUS<>51 ";
		$v_status_list = "TU_CHOI";
		$v_fuseaction_onclick = "DISPLAY_ALL_RECORD_WORK";
		$v_title = CONST_VIEW_NO_PROCESSING_RECORD_TITLE;
		$v_worktype = "";
		$v_show_date = false;
		$v_receive_date = "";
		$v_is_view_record_on_net = 1;
		include "../record-lib/qry_all_recordtype_by_staff.php";
		include "../record-lib/qry_all_record.php";
		include "../record-lib/dsp_all_record.php";
		break;
	case "DISPLAY_ALL_RECORD_FOR_SUPPLYMENT";
		$v_detail_status_compare = " And C_DETAIL_STATUS=20 ";
		$v_status_list = "DANG_THU_LY";
		$v_fuseaction_onclick = "DISPLAY_SINGLE_RECORD_CONTENT";
		$v_title = CONST_VIEW_SUPPLYMENT_RECORD_TITLE;
		$v_worktype = "";
		$v_show_date = false;
		$v_receive_date = "";
		$v_is_view_record_on_net = 1;
		include "../record-lib/qry_all_recordtype_by_staff.php";
		include "../record-lib/qry_all_record.php";
		include "../record-lib/dsp_all_record.php";
		break;
	case "DISPLAY_SINGLE_RECORD_CONTENT";
		$v_title = CONST_RECORD_CONTENT_TITLE;
		include "../record-lib/qry_single_record.php";
		include "../record-lib/dsp_single_record.php";
		break;
	case "DISPLAY_ALL_NET_RECORD_FOR_VIEW";
		$v_status_list = "0,1,2,3";
		$v_fuseaction_onclick = "DISPLAY_SINGLE_NET_RECORD_FOR_VIEW";
		$v_title = CONST_VIEW_NET_RECORD_TITLE;
		$v_show_date = false;
		$v_receive_date = "";
		include "../record-lib/qry_all_recordtype_by_staff.php";
		include "../customer/qry_all_record.php";
		include "../customer/dsp_all_record.php";
		break;
	//Phan xem thong tin chung cua ho so
	case "DISPLAY_ALL_RECORD_WORK";
		include "../record-lib/qry_single_record.php";
		include "../handle/qry_all_record_work.php";
		include "../handle/dsp_all_record_work.php";
		break;
	case "DISPLAY_SINGLE_RECORD_WORK";
		include "../record-lib/qry_single_record.php";
		include "../handle/qry_all_worktype.php";
		include "../handle/qry_single_record_work.php";
		include "../handle/dsp_single_record_work.php";
		break;
	case "DISPLAY_SINGLE_RECORD_INFOMATION";
		$v_title = CONST_RECORD_INFOMATION_TITLE;
		include "qry_single_record_infomation.php";
		include "dsp_single_record_infomation.php";
		break;
	default:
		$v_detail_status_compare = " And ((C_CURRENT_STATUS = ''CAP_PHEP'' And C_DETAIL_STATUS = 51) Or (C_CURRENT_STATUS = ''TU_CHOI'')) ";
		$v_fuseaction_onclick = "DISPLAY_SINGLE_RECORD_INFOMATION";
		$v_title = CONST_VIEW_PROCESSED_RECORD_TITLE;
		$v_is_view_record_on_net = 1;
		$v_xml_file_name = "danh_sach_ho_so_cong_dan_tra_cuu.xml";
		include "../record-lib/qry_all_recordtype_by_staff.php";
		include "../archives/qry_all_record_for_archives.php";
		include "../archives/dsp_all_record_for_archives.php";
		break;
}
include "../../disconnect.php";
if (!isset($_REQUEST['modal_dialog_mode'])) {
	include "../../dsp_footer.php";
}else{
	include "../../dsp_modal_dialog_footer.php";
}
?>